from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
import time
testCase="DBshop008_销售管理支付记录"
yuqi="订单完成"
rootPath=get_pro_rootpath()
orderID=readFile(rootPath+r'\public\order1.txt')
# 1.点击销售管理支付记录。
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu2(firefox, "销售管理", "支付记录")
# 2,点击"订单号"按钮，查看订单已发货还是未发货。
firefox.find_element_by_xpath("//a[text()='%s']"%orderID).click()
text=firefox.find_element_by_xpath("//span[@class='text-success']").text
print(text)
time.sleep(2)
if text==yuqi:
    writeLog("%s 测试通过"%testCase)
else:
    writeLog("%s 测试失败"%testCase)
    getPhoto(firefox)
firefox.quit()